package by.scsbsu.resources.managers;

import java.util.ResourceBundle;


public class DataStorageManager {
	
	public static final String STORAGE_CONFIG_BUNDLE =  "by.scsbsu.resources.storage_config";
	
	public static final String TEMP_DIR_SIZE = "TEMP_DIR_SIZE";
	public static final String MAX_FILE_SIZE = "MAX_FILE_SIZE";
	public static final String UPLOAD_DIR = "UPLOAD_DIR";
	public static final String VALID_FILE_TYPES = "VALID_FILE_TYPES";
	
	private static ResourceBundle resourceBundle = null;
	
    public static ResourceBundle getBundle() {
        if (resourceBundle == null) {
        	DataStorageManager.resourceBundle = 
        		ResourceBundle.getBundle(STORAGE_CONFIG_BUNDLE);
        }
        return resourceBundle;
    }

    public static String getProperty(String key) {
    	resourceBundle = getBundle();
        return resourceBundle.getString(key);
    }
}
